package com.youan.serve.dao.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.youan.pangu.base.bean.validate.UpdateValidateGroup;
import com.youan.pangu.plus.validate.NotRepeat;
import com.youan.serve.dao.idao.SyscodeMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author auto_code
 * @since 2020-02-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_syscode")
public class Syscode implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    @NotBlank(groups = UpdateValidateGroup.class,message = "codeId不能为空")
    private String codeId;
    @NotBlank(message = "字典名称不能为空")
    @NotRepeat(message = "存在重复的字典值", entityClass = Syscode.class, mapperClass = SyscodeMapper.class, columnName = "code_name")
    private String codeName;
    @NotBlank(message = "字典内容不能为空")
    private String codeContent;

    private String operator;

    private Date operatedTime;
}
